package com.longer.demo.biz.service.model;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @program: demo
 * @description:
 * @author: SunBiaoLong
 * @create: 2019-01-11 11:13
 **/
@Data
public class UserModel {
	private Integer id;
	/**
	 * notBlank
	 *  不能为null
	 *  不能为""
	 *
	 *  不能使用在Integer变量上
	 */
	@NotBlank(message = "用户名不能为空")
	private String name;
	@NotNull(message = "性别必须填写")
	private Byte gender;
	@NotNull(message = "年龄必须填写")
	@Min(value = 0, message = "年龄必须大于0岁")
	@Max(value = 200, message = "年龄必须小于200岁")
	private Integer age;
	@NotBlank(message = "手机号不能为空")
	private String phone;

	private String registerMode;

	private String thirdPartyId;
	@NotBlank(message = "密码不能为空")
	private String encryptPassword;
}
